'use client'
import Header from './_header'

import cn from '@/utils/classnames'
import { useGlobalPublicStore } from '@/context/global-public-context'
import useDocumentTitle from '@/hooks/use-document-title'
import { useRouter, useSearchParams } from 'next/navigation'

export default function SignInLayout({ children }: any) {
  const { systemFeatures } = useGlobalPublicStore()
  const searchParams = useSearchParams()
  const emailFromLink = decodeURIComponent(searchParams.get('email') || '')

  useDocumentTitle('')
  return <>
    <div className={cn('flex min-h-screen w-full justify-center')} style={{ background: "url('/img/loginBg.png') no-repeat", opacity: emailFromLink ? 0 : 1 }}>
      <div className={cn('w-full min-h-screen shrink-0 rounded-2xl border border-effects-highlight')}>
        {/* <Header /> */}
        <div className={cn('flex w-1/2 grow items-center justify-center px-6 m-auto')} style={{ height: '60vh', marginTop: '20vh' }}>
          <div className='flex flex-col items-center justify-around w-1/2 h-full py-10' style={{ background: 'linear-gradient(to top, #FFFFFF 0%, #2165FD 100%)' }}>
            <div className='text-[36px] font-bold text-white'>AI大模型管理后台</div>
            <img src='/img/loginImg.png' />
          </div>
          <div className='flex-1 flex flex-col justify-center md:w-[400px] bg-white h-full'>
            {children}
          </div>
        </div>
        {/* {systemFeatures.branding.enabled === false && <div className='px-8 py-6 system-xs-regular text-text-tertiary'>
          © {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
        </div>} */}
      </div>
    </div>
  </>
}
